//
//  HZJTreeModel.swift
//  HZJTreeView
//
//  Created by 何治军 on 2020/6/18.
//  Copyright © 2020 何治军. All rights reserved.
//

/// 数据模型,遵循HZJTreeViewModelProtocol就好
class HZJTreeModel: HZJTreeViewModelProtocol  {
    
    var fatherModel: HZJTreeViewModelProtocol?
    
    var childModels: [HZJTreeViewModelProtocol] = []
    
    /// 自定义的属性
    var titleInfo: String = ""
    
    /// 自定义便捷构造器
    init(_ titleInfo:String) {
        self.titleInfo = titleInfo
    }
}

class HZJTreeModel2: HZJTreeViewModelProtocol {
    
    var fatherModel: HZJTreeViewModelProtocol?
    
    var childModels: [HZJTreeViewModelProtocol] = []
    
    /// 自定义的属性
    var myTitle: String = "这里是另一个类"
    
        /// 自定义便捷构造器
    init(_ title:String) {
        self.myTitle = "\(self.myTitle):\(title)"
    }
}
